<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/8/23
 * Time: 10:53
 */

namespace app\home\controller;


use think\Db;

class Shops extends Base
{

    public function index()
    {
        $id = input('id');
        $shop_list = Db::name('user')->find(array('id'=>$id));

        $shop_next = Db::name('user')->where(array('id'=>array('>',$id)))->order('id')->find();
        $shop_on = Db::name('user')->where(array('id'=>array('<',$id)))->order('id desc')->find();
        $map = array(
            'list' => $shop_list,
            'shop_on' => $shop_on,
            'shop_next'=>$shop_next
        );
        return view('index',$map);
    }
}